﻿using System.Web.UI;

namespace UIControls
{
    public class RepeaterBodyItem : RepeaterItem
    {
        struct Constants
        {
            public const string PaddingLeft = "20px";
        }

        public RepeaterBodyItem(int itemIndex)
            : base(itemIndex)
        {
        }

        protected override void Render(HtmlTextWriter writer)
        {
            writer.AddAttribute(HtmlTextWriterAttribute.Id, this.ClientID);
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            writer.AddStyleAttribute(HtmlTextWriterStyle.PaddingLeft, Constants.PaddingLeft);
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            base.Render(writer);

            writer.RenderEndTag();
            writer.RenderEndTag();
        }
    }
}
